import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringParser {
    public List<String> parse(String s) {
        if (s == null)
            return Collections.emptyList();

        List<String> words = new ArrayList<String>();
        Pattern p = Pattern.compile("\\b[A-Za-z[-]а-яА-ЯёЁ]+\\b");
        Matcher m = p.matcher(s);
        while (m.find()) {
            words.add(m.group());
        }
        return words;
    }
}
